<?php
/**
 * 会员等级设置验证器
 */

namespace app\common\validate;

class UserLevelValidate extends Validate
{
    protected $rule = [
            'name|名称' => 'require',
    'growth_value|成长值' => 'require',
    'remark|等级备注' => 'require',
    'background_image|背景图片' => 'require',
    'image|等级图标' => 'require',
    'privilege|等级权益' => 'require',
    'discount|等级折扣' => 'require',
    'type|类型 1金额 2兑换' => 'require',
    'money|购买金额' => 'require',
    'num|天数' => 'require',

    ];

    protected $message = [
            'name.require' => '名称不能为空',
    'growth_value.require' => '成长值不能为空',
    'remark.require' => '等级备注不能为空',
    'background_image.require' => '背景图片不能为空',
    'image.require' => '等级图标不能为空',
    'privilege.require' => '等级权益不能为空',
    'discount.require' => '等级折扣不能为空',
    'type.require' => '类型 1金额 2兑换不能为空',
    'money.require' => '购买金额不能为空',
    'num.require' => '天数不能为空',

    ];

    protected $scene = [
        'add'  => ['name','growth_value','remark','background_image','image','privilege','discount','type','money','num',],
'edit' => ['name','growth_value','remark','background_image','image','privilege','discount','type','money','num',],

    ];

    

}
